#include <iostream>
using namespace std;

class Date
{
	private :
		int m_year;
		int m_mon;
		int m_day;
	public :
		Date(int year = 2016, int mon = 5, int day = 29) :
			m_year(year), m_mon(mon), m_day(day)
		{}

		friend ostream& operator <<(ostream& out, const Date& d);
		friend istream& operator >>(istream& in, Date& d);

	protected :
};

ostream& operator <<(ostream& out, const Date& d)
{
	out << d.m_year << " - " << d.m_mon << " - " << d.m_day;
	return out;
}

istream& operator >>(istream& in, Date& d)
{
	in >> d.m_year >> d.m_mon >> d.m_day;
	return in;
}

int main()
{
	Date d1;
	cout << d1 << endl;

	cin >> d1;//输入测试模式
	cout << d1 << endl;
}
